home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / cmds.fmt / chmod.man < prev    next >
Encoding:
Text File  |  1989-02-24  |  3.1 KB  |  133 lines

  1.  
  2.  
  3.  
  4. CHMOD                     User Commands                     CHMOD
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      chmod - change mode
  10.  
  11. SSYYNNOOPPSSIISS
  12.      cchhmmoodd [ --RRff ] mode file ...
  13.  
  14. DDEESSCCRRIIPPTTIIOONN
  15.      The mode of each named file is changed according to _m_o_d_e,
  16.      which may be absolute or symbolic.  An absolute _m_o_d_e is an
  17.      octal number constructed from the OR of the following modes:
  18.  
  19.      4000      set user ID on execution
  20.      2000      set group ID on execution
  21.      1000      sticky bit, see _c_h_m_o_d(2)
  22.      0400      read by owner
  23.      0200      write by owner
  24.      0100      execute (search in directory) by owner
  25.      0070      read, write, execute (search) by group
  26.      0007      read, write, execute (search) by others
  27.  
  28.      A symbolic _m_o_d_e has the form:
  29.  
  30.           [_w_h_o] _o_p _p_e_r_m_i_s_s_i_o_n [_o_p _p_e_r_m_i_s_s_i_o_n] ...
  31.  
  32.      The _w_h_o part is a combination of the letters uu (for user's
  33.      permissions), gg (group) and oo (other).  The letter aa stands
  34.      for all, or uuggoo..  If _w_h_o is omitted, the default is _a but
  35.      the setting of the file creation mask (see umask(2)) is
  36.      taken into account.
  37.  
  38.      _O_p can be ++ to add _p_e_r_m_i_s_s_i_o_n to the file's mode, -- to take
  39.      away _p_e_r_m_i_s_s_i_o_n and == to assign _p_e_r_m_i_s_s_i_o_n absolutely (all
  40.      other bits will be reset).
  41.  
  42.      _P_e_r_m_i_s_s_i_o_n is any combination of the letters rr (read), ww
  43.      (write), xx (execute), XX (set execute only if file is a
  44.      directory or some other execute bit is set), ss (set owner or
  45.      group id) and tt (save text - sticky).  Letters uu, gg, or oo
  46.      indicate that _p_e_r_m_i_s_s_i_o_n is to be taken from the current
  47.      mode. Omitting _p_e_r_m_i_s_s_i_o_n is only useful with == to take away
  48.      all permissions.
  49.  
  50.      When the --RR option is given, _c_h_m_o_d recursively descends its
  51.      directory arguments setting the mode for each file as
  52.      described above.  When symbolic links are encountered, their
  53.      mode is not changed and they are not traversed.
  54.  
  55.      If the --ff option is given, _c_h_m_o_d will not complain if it
  56.      fails to change the mode on a file.
  57.  
  58. EEXXAAMMPPLLEESS
  59.      The first example denies write permission to others, the
  60.  
  61.  
  62.  
  63. Sprite v1.0               May 22, 1986                          1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. CHMOD                     User Commands                     CHMOD
  71.  
  72.  
  73.  
  74.      second makes a file executable by all if it is executable by
  75.      anyone:
  76.  
  77.           chmod o-w file
  78.           chmod +X file
  79.  
  80.      Multiple symbolic modes separated by commas may be given.
  81.      Operations are performed in the order specified.  The letter
  82.      ss is only useful with uu or gg..
  83.  
  84.      Only the owner of a file (or the super-user) may change its
  85.      mode.
  86.  
  87. SSEEEE AALLSSOO
  88.      ls(1), chmod(2), stat(2), umask(2), chown(8)
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. Sprite v1.0               May 22, 1986                          2
  130.  
  131.  
  132.  
  133.